import request from "../utils/request"
import { loginDataType, registerDataType, } from '../interface'

//登录
export const apiLogin = (data: loginDataType) => {
    return request({
        url: '/api/login',
        method: 'post',
        data
    })
}

// gitee 第三方登录
export const apiGiteeLogin = (data: { code: string }) => {
    return request({
        url: '/api/giteeLogin',
        method: 'post',
        data
    })
}

//注册
export const apiRegister = (data: registerDataType) => {
    return request({
        url: '/api/register',
        method: 'post',
        data
    })
}

//用户
export const apigetUserInfo = () => {
    return request({
        url: '/api/getuserinfo',
    })
}


//获取房源列表数据
export const apiGetHousingList = (data?: any) => {
    return request({
        url: '/api/getHousingList',
        method: 'post',
        data
    })
}
